﻿@model List<DogsClub.WebUI.Models.Vaccination>
@{
    Layout = "~\\Views\\Shared\\_Layout4.cshtml";
    DateTime startPeriod = (DateTime)ViewData["startPeriod"];
    DateTime endPeriod = (DateTime)ViewData["endPeriod"];
}

<link href="~/Content/DataTables-1.10.4/css/jquery.dataTables.css" rel="stylesheet" />
<div class="ConteinerReportVaccination">
    <div class="FormReportVaccination">
        <span class="headerWer">Вакцинация </span>c @startPeriod.ToLongDateString() по @endPeriod.ToLongDateString()
    </div>
    <div class="graphic-wrap">
        <table class="table table-hover" id="tableReport">
            <thead>
                <tr>
                    <th class="ZagName">
                        Кличка
                    </th>
                    <th class="ZagName">
                        Парода
                    </th>
                    <th class="ZagName">
                        Пол
                    </th>
                    <th class="ZagName">
                        Возраст
                    </th>
                    <th class="ZagName">
                        Владелец
                    </th>
                    <th class="ZagName">
                        Прививка
                    </th>
                    <th class="ZagName">
                        Дата
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td class="ZagValue2">@item.GetDog.Name</td>
                        <td class="ZagValue2">@item.GetDog.DogType.Name</td>
                        <td class="ZagValue2">@item.GetDog.GetSex</td>
                        <td class="ZagValue2">@item.GetDog.Age</td>
                        <td class="ZagValue2">@item.GetDog.GetUser.LastName @item.GetDog.GetUser.FirstName @item.GetDog.GetUser.MiddleName</td>
                        <td class="ZagValue2">@item.Name</td>
                        <td class="ZagValue2">@item.DateVacination.Value.ToLongDateString()</td>
                    </tr>
                }
            </tbody>

        </table>
    </div>
</div>
@section script {
    <script src="~/Scripts/bootstrap.js"></script>
    <script src="~/Scripts/DataTables-1.10.4/jquery.dataTables.js"></script>
    <script>
        $(document).ready(function () {
            $("#tableReport").dataTable({
                "language": {
                    "lengthMenu": "Отображать _MENU_ записей на странице",
                    "zeroRecords": "Извините, таблица пуста",
                    "info": "Страница _PAGE_ из _PAGES_",
                    "infoEmpty": "Нет доступных записей",
                    "infoFiltered": "(filtered from _MAX_ total records)",
                    "paginate": {
                        "next": "Следующая страница",
                        "previous": "Предыдущая страница"
                    },
                    "search": "Найти"
                }
            });
        })
    </script>
}
